﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LitJson;

namespace ddz_server.game
{
    enum MessageType
    {
        ONLINE_FULL,
        JOIN_GAME,
        CLIENT_START_ROOM,
        START_ROOM
    }
    class Message
    {

        public MessageType type;
        public int[] intParas;
        public List<Card> cards;

       

        public string ToJson()
        {
            return JsonMapper.ToJson(this);
        }

        public static Message ONLINE_FULL()
        {
            Message m = new Message();
            m.type = MessageType.ONLINE_FULL;
            return m;
        }

        public static Message JOIN_GAME()
        {
            Message message = new Message();
            message.type = MessageType.JOIN_GAME;
            return message;
        }

        public static Message START_ROOM(int[] paras, List<Card> cards)
        {
            Message message = new Message();
            message.type = MessageType.START_ROOM;
            message.intParas = paras;
            message.cards = cards;
            return message;
        }
    }
}
